\(\int \frac {(a+b \arctan (c x))^2}{x^3 (d+e x^2)^2} \, dx\) [1274]

   Optimal result
   Rubi [A] (verified)
   Mathematica [F]
   Maple [F]
   Fricas [F]
   Sympy [F(-1)]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 23, antiderivative size = 1181 \[ \int \frac {(a+b \arctan (c x))^2}{x^3 \left (d+e x^2\right )^2} \, dx=-\frac {b c (a+b \arctan (c x))}{d^2 x}-\frac {c^2 (a+b \arctan (c x))^2}{2 d^2}+\frac {c^2 e (a+b \arctan (c x))^2}{2 d^2 \left (c^2 d-e\right )}-\frac {(a+b \arctan (c x))^2}{2 d^2 x^2}-\frac {e (a+b \arctan (c x))^2}{4 d^3 \left (1-\frac {\sqrt {e} x}{\sqrt {-d}}\right )}-\frac {e (a+b \arctan (c x))^2}{4 d^3 \left (1+\frac {\sqrt {e} x}{\sqrt {-d}}\right )}-\frac {4 e (a+b \arctan (c x))^2 \text {arctanh}\left (1-\frac {2}{1+i c x}\right )}{d^3}+\frac {b^2 c^2 \log (x)}{d^2}-\frac {2 e (a+b \arctan (c x))^2 \log \left (\frac {2}{1-i c x}\right )}{d^3}-\frac {b c e^{3/2} (a+b \arctan (c x)) \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 (-d)^{5/2} \left (c^2 d-e\right )}+\frac {e (a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{d^3}+\frac {b c e^{3/2} (a+b \arctan (c x)) \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 (-d)^{5/2} \left (c^2 d-e\right )}+\frac {e (a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{d^3}-\frac {b^2 c^2 \log \left (1+c^2 x^2\right )}{2 d^2}+\frac {2 i b e (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1-i c x}\right )}{d^3}+\frac {2 i b e (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )}{d^3}-\frac {2 i b e (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,-1+\frac {2}{1+i c x}\right )}{d^3}+\frac {i b^2 c e^{3/2} \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 (-d)^{5/2} \left (c^2 d-e\right )}-\frac {i b e (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{d^3}-\frac {i b^2 c e^{3/2} \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 (-d)^{5/2} \left (c^2 d-e\right )}-\frac {i b e (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{d^3}-\frac {b^2 e \operatorname {PolyLog}\left (3,1-\frac {2}{1-i c x}\right )}{d^3}+\frac {b^2 e \operatorname {PolyLog}\left (3,1-\frac {2}{1+i c x}\right )}{d^3}-\frac {b^2 e \operatorname {PolyLog}\left (3,-1+\frac {2}{1+i c x}\right )}{d^3}+\frac {b^2 e \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 d^3}+\frac {b^2 e \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 d^3} \]

[Out]

1/2*c^2*e*(a+b*arctan(c*x))^2/d^2/(c^2*d-e)-2*I*b*e*(a+b*arctan(c*x))*polylog(2,-1+2/(1+I*c*x))/d^3-I*b*e*(a+b
*arctan(c*x))*polylog(2,1-2*c*((-d)^(1/2)-x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)-I*e^(1/2)))/d^3-I*b*e*(a+b*arctan
(c*x))*polylog(2,1-2*c*((-d)^(1/2)+x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)+I*e^(1/2)))/d^3-b*c*(a+b*arctan(c*x))/d^
2/x-1/2*b^2*c^2*ln(c^2*x^2+1)/d^2-1/2*b*c*e^(3/2)*(a+b*arctan(c*x))*ln(2*c*((-d)^(1/2)-x*e^(1/2))/(1-I*c*x)/(c
*(-d)^(1/2)-I*e^(1/2)))/(-d)^(5/2)/(c^2*d-e)+1/2*b*c*e^(3/2)*(a+b*arctan(c*x))*ln(2*c*((-d)^(1/2)+x*e^(1/2))/(
1-I*c*x)/(c*(-d)^(1/2)+I*e^(1/2)))/(-d)^(5/2)/(c^2*d-e)-1/4*I*b^2*c*e^(3/2)*polylog(2,1-2*c*((-d)^(1/2)+x*e^(1
/2))/(1-I*c*x)/(c*(-d)^(1/2)+I*e^(1/2)))/(-d)^(5/2)/(c^2*d-e)-b^2*e*polylog(3,-1+2/(1+I*c*x))/d^3+e*(a+b*arcta
n(c*x))^2*ln(2*c*((-d)^(1/2)+x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)+I*e^(1/2)))/d^3-b^2*e*polylog(3,1-2/(1-I*c*x))
/d^3+e*(a+b*arctan(c*x))^2*ln(2*c*((-d)^(1/2)-x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)-I*e^(1/2)))/d^3+b^2*e*polylog
(3,1-2/(1+I*c*x))/d^3-2*e*(a+b*arctan(c*x))^2*ln(2/(1-I*c*x))/d^3+1/2*b^2*e*polylog(3,1-2*c*((-d)^(1/2)-x*e^(1
/2))/(1-I*c*x)/(c*(-d)^(1/2)-I*e^(1/2)))/d^3+1/2*b^2*e*polylog(3,1-2*c*((-d)^(1/2)+x*e^(1/2))/(1-I*c*x)/(c*(-d
)^(1/2)+I*e^(1/2)))/d^3-1/4*e*(a+b*arctan(c*x))^2/d^3/(1-x*e^(1/2)/(-d)^(1/2))-1/4*e*(a+b*arctan(c*x))^2/d^3/(
1+x*e^(1/2)/(-d)^(1/2))+4*e*(a+b*arctan(c*x))^2*arctanh(-1+2/(1+I*c*x))/d^3+b^2*c^2*ln(x)/d^2+1/4*I*b^2*c*e^(3
/2)*polylog(2,1-2*c*((-d)^(1/2)-x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)-I*e^(1/2)))/(-d)^(5/2)/(c^2*d-e)+2*I*b*e*(a
+b*arctan(c*x))*polylog(2,1-2/(1-I*c*x))/d^3+2*I*b*e*(a+b*arctan(c*x))*polylog(2,1-2/(1+I*c*x))/d^3-1/2*c^2*(a
+b*arctan(c*x))^2/d^2-1/2*(a+b*arctan(c*x))^2/d^2/x^2

Rubi [A] (verified)

Time = 1.43 (sec) , antiderivative size = 1181, normalized size of antiderivative = 1.00, number of steps used = 47, number of rules used = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.957, Rules used = {5100, 4946, 5038, 272, 36, 29, 31, 5004, 4942, 5108, 5114, 6745, 5098, 4974, 4966, 2449, 2352, 2497, 5104, 5040, 4964, 4968} \[ \int \frac {(a+b \arctan (c x))^2}{x^3 \left (d+e x^2\right )^2} \, dx=\frac {c^2 \log (x) b^2}{d^2}-\frac {c^2 \log \left (c^2 x^2+1\right ) b^2}{2 d^2}+\frac {i c e^{3/2} \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right ) b^2}{4 (-d)^{5/2} \left (c^2 d-e\right )}-\frac {i c e^{3/2} \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right ) b^2}{4 (-d)^{5/2} \left (c^2 d-e\right )}-\frac {e \operatorname {PolyLog}\left (3,1-\frac {2}{1-i c x}\right ) b^2}{d^3}+\frac {e \operatorname {PolyLog}\left (3,1-\frac {2}{i c x+1}\right ) b^2}{d^3}-\frac {e \operatorname {PolyLog}\left (3,\frac {2}{i c x+1}-1\right ) b^2}{d^3}+\frac {e \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right ) b^2}{2 d^3}+\frac {e \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right ) b^2}{2 d^3}-\frac {c (a+b \arctan (c x)) b}{d^2 x}-\frac {c e^{3/2} (a+b \arctan (c x)) \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right ) b}{2 (-d)^{5/2} \left (c^2 d-e\right )}+\frac {c e^{3/2} (a+b \arctan (c x)) \log \left (\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right ) b}{2 (-d)^{5/2} \left (c^2 d-e\right )}+\frac {2 i e (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1-i c x}\right ) b}{d^3}+\frac {2 i e (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{i c x+1}\right ) b}{d^3}-\frac {2 i e (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,\frac {2}{i c x+1}-1\right ) b}{d^3}-\frac {i e (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right ) b}{d^3}-\frac {i e (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right ) b}{d^3}+\frac {c^2 e (a+b \arctan (c x))^2}{2 d^2 \left (c^2 d-e\right )}-\frac {e (a+b \arctan (c x))^2}{4 d^3 \left (1-\frac {\sqrt {e} x}{\sqrt {-d}}\right )}-\frac {e (a+b \arctan (c x))^2}{4 d^3 \left (\frac {\sqrt {e} x}{\sqrt {-d}}+1\right )}-\frac {c^2 (a+b \arctan (c x))^2}{2 d^2}-\frac {(a+b \arctan (c x))^2}{2 d^2 x^2}-\frac {4 e (a+b \arctan (c x))^2 \text {arctanh}\left (1-\frac {2}{i c x+1}\right )}{d^3}-\frac {2 e (a+b \arctan (c x))^2 \log \left (\frac {2}{1-i c x}\right )}{d^3}+\frac {e (a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{d^3}+\frac {e (a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right )}{d^3} \]

[In]

Int[(a + b*ArcTan[c*x])^2/(x^3*(d + e*x^2)^2),x]

[Out]

-((b*c*(a + b*ArcTan[c*x]))/(d^2*x)) - (c^2*(a + b*ArcTan[c*x])^2)/(2*d^2) + (c^2*e*(a + b*ArcTan[c*x])^2)/(2*
d^2*(c^2*d - e)) - (a + b*ArcTan[c*x])^2/(2*d^2*x^2) - (e*(a + b*ArcTan[c*x])^2)/(4*d^3*(1 - (Sqrt[e]*x)/Sqrt[
-d])) - (e*(a + b*ArcTan[c*x])^2)/(4*d^3*(1 + (Sqrt[e]*x)/Sqrt[-d])) - (4*e*(a + b*ArcTan[c*x])^2*ArcTanh[1 -
2/(1 + I*c*x)])/d^3 + (b^2*c^2*Log[x])/d^2 - (2*e*(a + b*ArcTan[c*x])^2*Log[2/(1 - I*c*x)])/d^3 - (b*c*e^(3/2)
*(a + b*ArcTan[c*x])*Log[(2*c*(Sqrt[-d] - Sqrt[e]*x))/((c*Sqrt[-d] - I*Sqrt[e])*(1 - I*c*x))])/(2*(-d)^(5/2)*(
c^2*d - e)) + (e*(a + b*ArcTan[c*x])^2*Log[(2*c*(Sqrt[-d] - Sqrt[e]*x))/((c*Sqrt[-d] - I*Sqrt[e])*(1 - I*c*x))
])/d^3 + (b*c*e^(3/2)*(a + b*ArcTan[c*x])*Log[(2*c*(Sqrt[-d] + Sqrt[e]*x))/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*
x))])/(2*(-d)^(5/2)*(c^2*d - e)) + (e*(a + b*ArcTan[c*x])^2*Log[(2*c*(Sqrt[-d] + Sqrt[e]*x))/((c*Sqrt[-d] + I*
Sqrt[e])*(1 - I*c*x))])/d^3 - (b^2*c^2*Log[1 + c^2*x^2])/(2*d^2) + ((2*I)*b*e*(a + b*ArcTan[c*x])*PolyLog[2, 1
 - 2/(1 - I*c*x)])/d^3 + ((2*I)*b*e*(a + b*ArcTan[c*x])*PolyLog[2, 1 - 2/(1 + I*c*x)])/d^3 - ((2*I)*b*e*(a + b
*ArcTan[c*x])*PolyLog[2, -1 + 2/(1 + I*c*x)])/d^3 + ((I/4)*b^2*c*e^(3/2)*PolyLog[2, 1 - (2*c*(Sqrt[-d] - Sqrt[
e]*x))/((c*Sqrt[-d] - I*Sqrt[e])*(1 - I*c*x))])/((-d)^(5/2)*(c^2*d - e)) - (I*b*e*(a + b*ArcTan[c*x])*PolyLog[
2, 1 - (2*c*(Sqrt[-d] - Sqrt[e]*x))/((c*Sqrt[-d] - I*Sqrt[e])*(1 - I*c*x))])/d^3 - ((I/4)*b^2*c*e^(3/2)*PolyLo
g[2, 1 - (2*c*(Sqrt[-d] + Sqrt[e]*x))/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*x))])/((-d)^(5/2)*(c^2*d - e)) - (I*b
*e*(a + b*ArcTan[c*x])*PolyLog[2, 1 - (2*c*(Sqrt[-d] + Sqrt[e]*x))/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*x))])/d^
3 - (b^2*e*PolyLog[3, 1 - 2/(1 - I*c*x)])/d^3 + (b^2*e*PolyLog[3, 1 - 2/(1 + I*c*x)])/d^3 - (b^2*e*PolyLog[3,
-1 + 2/(1 + I*c*x)])/d^3 + (b^2*e*PolyLog[3, 1 - (2*c*(Sqrt[-d] - Sqrt[e]*x))/((c*Sqrt[-d] - I*Sqrt[e])*(1 - I
*c*x))])/(2*d^3) + (b^2*e*PolyLog[3, 1 - (2*c*(Sqrt[-d] + Sqrt[e]*x))/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*x))])
/(2*d^3)

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 2352

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-e^(-1))*PolyLog[2, 1 - c*x], x] /; FreeQ[{c, d, e
}, x] && EqQ[e + c*d, 0]

Rule 2449

Int[Log[(c_.)/((d_) + (e_.)*(x_))]/((f_) + (g_.)*(x_)^2), x_Symbol] :> Dist[-e/g, Subst[Int[Log[2*d*x]/(1 - 2*
d*x), x], x, 1/(d + e*x)], x] /; FreeQ[{c, d, e, f, g}, x] && EqQ[c, 2*d] && EqQ[e^2*f + d^2*g, 0]

Rule 2497

Int[Log[u_]*(Pq_)^(m_.), x_Symbol] :> With[{C = FullSimplify[Pq^m*((1 - u)/D[u, x])]}, Simp[C*PolyLog[2, 1 - u
], x] /; FreeQ[C, x]] /; IntegerQ[m] && PolyQ[Pq, x] && RationalFunctionQ[u, x] && LeQ[RationalFunctionExponen
ts[u, x][[2]], Expon[Pq, x]]

Rule 4942

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_)/(x_), x_Symbol] :> Simp[2*(a + b*ArcTan[c*x])^p*ArcTanh[1 - 2/(1 +
 I*c*x)], x] - Dist[2*b*c*p, Int[(a + b*ArcTan[c*x])^(p - 1)*(ArcTanh[1 - 2/(1 + I*c*x)]/(1 + c^2*x^2)), x], x
] /; FreeQ[{a, b, c}, x] && IGtQ[p, 1]

Rule 4946

Int[((a_.) + ArcTan[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)*((a + b*ArcTan[c*x^
n])^p/(m + 1)), x] - Dist[b*c*n*(p/(m + 1)), Int[x^(m + n)*((a + b*ArcTan[c*x^n])^(p - 1)/(1 + c^2*x^(2*n))),
x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0] && (EqQ[p, 1] || (EqQ[n, 1] && IntegerQ[m])) && NeQ[m, -1]

Rule 4964

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-(a + b*ArcTan[c*x])^p)*(
Log[2/(1 + e*(x/d))]/e), x] + Dist[b*c*(p/e), Int[(a + b*ArcTan[c*x])^(p - 1)*(Log[2/(1 + e*(x/d))]/(1 + c^2*x
^2)), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[c^2*d^2 + e^2, 0]

Rule 4966

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-(a + b*ArcTan[c*x]))*(Log[2/(1
 - I*c*x)]/e), x] + (Dist[b*(c/e), Int[Log[2/(1 - I*c*x)]/(1 + c^2*x^2), x], x] - Dist[b*(c/e), Int[Log[2*c*((
d + e*x)/((c*d + I*e)*(1 - I*c*x)))]/(1 + c^2*x^2), x], x] + Simp[(a + b*ArcTan[c*x])*(Log[2*c*((d + e*x)/((c*
d + I*e)*(1 - I*c*x)))]/e), x]) /; FreeQ[{a, b, c, d, e}, x] && NeQ[c^2*d^2 + e^2, 0]

Rule 4968

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^2/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-(a + b*ArcTan[c*x])^2)*(Log[
2/(1 - I*c*x)]/e), x] + (Simp[(a + b*ArcTan[c*x])^2*(Log[2*c*((d + e*x)/((c*d + I*e)*(1 - I*c*x)))]/e), x] + S
imp[I*b*(a + b*ArcTan[c*x])*(PolyLog[2, 1 - 2/(1 - I*c*x)]/e), x] - Simp[I*b*(a + b*ArcTan[c*x])*(PolyLog[2, 1
 - 2*c*((d + e*x)/((c*d + I*e)*(1 - I*c*x)))]/e), x] - Simp[b^2*(PolyLog[3, 1 - 2/(1 - I*c*x)]/(2*e)), x] + Si
mp[b^2*(PolyLog[3, 1 - 2*c*((d + e*x)/((c*d + I*e)*(1 - I*c*x)))]/(2*e)), x]) /; FreeQ[{a, b, c, d, e}, x] &&
NeQ[c^2*d^2 + e^2, 0]

Rule 4974

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_)*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[(d + e*x)^(q + 1)*((a
 + b*ArcTan[c*x])^p/(e*(q + 1))), x] - Dist[b*c*(p/(e*(q + 1))), Int[ExpandIntegrand[(a + b*ArcTan[c*x])^(p -
1), (d + e*x)^(q + 1)/(1 + c^2*x^2), x], x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 1] && IntegerQ[q] && N
eQ[q, -1]

Rule 5004

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTan[c*x])^(p +
 1)/(b*c*d*(p + 1)), x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[e, c^2*d] && NeQ[p, -1]

Rule 5038

Int[(((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_))/((d_) + (e_.)*(x_)^2), x_Symbol] :> Dist[1/d,
 Int[(f*x)^m*(a + b*ArcTan[c*x])^p, x], x] - Dist[e/(d*f^2), Int[(f*x)^(m + 2)*((a + b*ArcTan[c*x])^p/(d + e*x
^2)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && GtQ[p, 0] && LtQ[m, -1]

Rule 5040

Int[(((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*(x_))/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(-I)*((a + b*ArcT
an[c*x])^(p + 1)/(b*e*(p + 1))), x] - Dist[1/(c*d), Int[(a + b*ArcTan[c*x])^p/(I - c*x), x], x] /; FreeQ[{a, b
, c, d, e}, x] && EqQ[e, c^2*d] && IGtQ[p, 0]

Rule 5098

Int[(((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*(x_))/((d_) + (e_.)*(x_)^2)^2, x_Symbol] :> Dist[1/(4*d^2*Rt[-e/
d, 2]), Int[(a + b*ArcTan[c*x])^p/(1 - Rt[-e/d, 2]*x)^2, x], x] - Dist[1/(4*d^2*Rt[-e/d, 2]), Int[(a + b*ArcTa
n[c*x])^p/(1 + Rt[-e/d, 2]*x)^2, x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0]

Rule 5100

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.), x_Symbol] :> With
[{u = ExpandIntegrand[(a + b*ArcTan[c*x])^p, (f*x)^m*(d + e*x^2)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b,
 c, d, e, f, m}, x] && IntegerQ[q] && IGtQ[p, 0] && ((EqQ[p, 1] && GtQ[q, 0]) || IntegerQ[m])

Rule 5104

Int[(((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_) + (g_.)*(x_))^(m_.))/((d_) + (e_.)*(x_)^2), x_Symbol] :> I
nt[ExpandIntegrand[(a + b*ArcTan[c*x])^p/(d + e*x^2), (f + g*x)^m, x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] &
& IGtQ[p, 0] && EqQ[e, c^2*d] && IGtQ[m, 0]

Rule 5108

Int[(ArcTanh[u_]*((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.))/((d_) + (e_.)*(x_)^2), x_Symbol] :> Dist[1/2, Int[L
og[1 + u]*((a + b*ArcTan[c*x])^p/(d + e*x^2)), x], x] - Dist[1/2, Int[Log[1 - u]*((a + b*ArcTan[c*x])^p/(d + e
*x^2)), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[e, c^2*d] && EqQ[u^2 - (1 - 2*(I/(I - c*x)))^
2, 0]

Rule 5114

Int[(Log[u_]*((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.))/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(-I)*(a + b*Ar
cTan[c*x])^p*(PolyLog[2, 1 - u]/(2*c*d)), x] + Dist[b*p*(I/2), Int[(a + b*ArcTan[c*x])^(p - 1)*(PolyLog[2, 1 -
 u]/(d + e*x^2)), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[e, c^2*d] && EqQ[(1 - u)^2 - (1 - 2
*(I/(I - c*x)))^2, 0]

Rule 6745

Int[(u_)*PolyLog[n_, v_], x_Symbol] :> With[{w = DerivativeDivides[v, u*v, x]}, Simp[w*PolyLog[n + 1, v], x] /
;  !FalseQ[w]] /; FreeQ[n, x]

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {(a+b \arctan (c x))^2}{d^2 x^3}-\frac {2 e (a+b \arctan (c x))^2}{d^3 x}+\frac {e^2 x (a+b \arctan (c x))^2}{d^2 \left (d+e x^2\right )^2}+\frac {2 e^2 x (a+b \arctan (c x))^2}{d^3 \left (d+e x^2\right )}\right ) \, dx \\ & = \frac {\int \frac {(a+b \arctan (c x))^2}{x^3} \, dx}{d^2}-\frac {(2 e) \int \frac {(a+b \arctan (c x))^2}{x} \, dx}{d^3}+\frac {\left (2 e^2\right ) \int \frac {x (a+b \arctan (c x))^2}{d+e x^2} \, dx}{d^3}+\frac {e^2 \int \frac {x (a+b \arctan (c x))^2}{\left (d+e x^2\right )^2} \, dx}{d^2} \\ & = -\frac {(a+b \arctan (c x))^2}{2 d^2 x^2}-\frac {4 e (a+b \arctan (c x))^2 \text {arctanh}\left (1-\frac {2}{1+i c x}\right )}{d^3}+\frac {(b c) \int \frac {a+b \arctan (c x)}{x^2 \left (1+c^2 x^2\right )} \, dx}{d^2}+\frac {(8 b c e) \int \frac {(a+b \arctan (c x)) \text {arctanh}\left (1-\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{d^3}+\frac {e^{3/2} \int \frac {(a+b \arctan (c x))^2}{\left (1-\frac {\sqrt {e} x}{\sqrt {-d}}\right )^2} \, dx}{4 (-d)^{7/2}}-\frac {e^{3/2} \int \frac {(a+b \arctan (c x))^2}{\left (1+\frac {\sqrt {e} x}{\sqrt {-d}}\right )^2} \, dx}{4 (-d)^{7/2}}+\frac {\left (2 e^2\right ) \int \left (-\frac {(a+b \arctan (c x))^2}{2 \sqrt {e} \left (\sqrt {-d}-\sqrt {e} x\right )}+\frac {(a+b \arctan (c x))^2}{2 \sqrt {e} \left (\sqrt {-d}+\sqrt {e} x\right )}\right ) \, dx}{d^3} \\ & = -\frac {(a+b \arctan (c x))^2}{2 d^2 x^2}-\frac {e (a+b \arctan (c x))^2}{4 d^3 \left (1-\frac {\sqrt {e} x}{\sqrt {-d}}\right )}-\frac {e (a+b \arctan (c x))^2}{4 d^3 \left (1+\frac {\sqrt {e} x}{\sqrt {-d}}\right )}-\frac {4 e (a+b \arctan (c x))^2 \text {arctanh}\left (1-\frac {2}{1+i c x}\right )}{d^3}+\frac {(b c) \int \frac {a+b \arctan (c x)}{x^2} \, dx}{d^2}-\frac {\left (b c^3\right ) \int \frac {a+b \arctan (c x)}{1+c^2 x^2} \, dx}{d^2}+\frac {(b c e) \int \left (\frac {\sqrt {-d} e (a+b \arctan (c x))}{\left (c^2 d-e\right ) \left (-\sqrt {-d}+\sqrt {e} x\right )}+\frac {c^2 d \left (\sqrt {-d}+\sqrt {e} x\right ) (a+b \arctan (c x))}{\sqrt {-d} \left (c^2 d-e\right ) \left (1+c^2 x^2\right )}\right ) \, dx}{2 d^3}+\frac {(b c e) \int \left (\frac {\sqrt {-d} e (a+b \arctan (c x))}{\left (-c^2 d+e\right ) \left (\sqrt {-d}+\sqrt {e} x\right )}+\frac {c^2 \left (d+\sqrt {-d} \sqrt {e} x\right ) (a+b \arctan (c x))}{\left (c^2 d-e\right ) \left (1+c^2 x^2\right )}\right ) \, dx}{2 d^3}-\frac {(4 b c e) \int \frac {(a+b \arctan (c x)) \log \left (\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{d^3}+\frac {(4 b c e) \int \frac {(a+b \arctan (c x)) \log \left (2-\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{d^3}-\frac {e^{3/2} \int \frac {(a+b \arctan (c x))^2}{\sqrt {-d}-\sqrt {e} x} \, dx}{d^3}+\frac {e^{3/2} \int \frac {(a+b \arctan (c x))^2}{\sqrt {-d}+\sqrt {e} x} \, dx}{d^3} \\ & = -\frac {b c (a+b \arctan (c x))}{d^2 x}-\frac {c^2 (a+b \arctan (c x))^2}{2 d^2}-\frac {(a+b \arctan (c x))^2}{2 d^2 x^2}-\frac {e (a+b \arctan (c x))^2}{4 d^3 \left (1-\frac {\sqrt {e} x}{\sqrt {-d}}\right )}-\frac {e (a+b \arctan (c x))^2}{4 d^3 \left (1+\frac {\sqrt {e} x}{\sqrt {-d}}\right )}-\frac {4 e (a+b \arctan (c x))^2 \text {arctanh}\left (1-\frac {2}{1+i c x}\right )}{d^3}-\frac {2 e (a+b \arctan (c x))^2 \log \left (\frac {2}{1-i c x}\right )}{d^3}+\frac {e (a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{d^3}+\frac {e (a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{d^3}+\frac {2 i b e (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1-i c x}\right )}{d^3}+\frac {2 i b e (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )}{d^3}-\frac {2 i b e (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,-1+\frac {2}{1+i c x}\right )}{d^3}-\frac {i b e (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{d^3}-\frac {i b e (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{d^3}-\frac {b^2 e \operatorname {PolyLog}\left (3,1-\frac {2}{1-i c x}\right )}{d^3}+\frac {b^2 e \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 d^3}+\frac {b^2 e \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 d^3}+\frac {\left (b^2 c^2\right ) \int \frac {1}{x \left (1+c^2 x^2\right )} \, dx}{d^2}-\frac {\left (2 i b^2 c e\right ) \int \frac {\operatorname {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{d^3}+\frac {\left (2 i b^2 c e\right ) \int \frac {\operatorname {PolyLog}\left (2,-1+\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{d^3}+\frac {\left (b c^3 e\right ) \int \frac {\left (\sqrt {-d}+\sqrt {e} x\right ) (a+b \arctan (c x))}{1+c^2 x^2} \, dx}{2 (-d)^{5/2} \left (c^2 d-e\right )}+\frac {\left (b c^3 e\right ) \int \frac {\left (d+\sqrt {-d} \sqrt {e} x\right ) (a+b \arctan (c x))}{1+c^2 x^2} \, dx}{2 d^3 \left (c^2 d-e\right )}-\frac {\left (b c e^2\right ) \int \frac {a+b \arctan (c x)}{-\sqrt {-d}+\sqrt {e} x} \, dx}{2 (-d)^{5/2} \left (c^2 d-e\right )}+\frac {\left (b c e^2\right ) \int \frac {a+b \arctan (c x)}{\sqrt {-d}+\sqrt {e} x} \, dx}{2 (-d)^{5/2} \left (c^2 d-e\right )} \\ & = \text {Too large to display} \\ \end{align*}

Mathematica [F]

\[ \int \frac {(a+b \arctan (c x))^2}{x^3 \left (d+e x^2\right )^2} \, dx=\int \frac {(a+b \arctan (c x))^2}{x^3 \left (d+e x^2\right )^2} \, dx \]

[In]

Integrate[(a + b*ArcTan[c*x])^2/(x^3*(d + e*x^2)^2),x]

[Out]

Integrate[(a + b*ArcTan[c*x])^2/(x^3*(d + e*x^2)^2), x]

Maple [F]

\[\int \frac {\left (a +b \arctan \left (c x \right )\right )^{2}}{x^{3} \left (e \,x^{2}+d \right )^{2}}d x\]

[In]

int((a+b*arctan(c*x))^2/x^3/(e*x^2+d)^2,x)

[Out]

int((a+b*arctan(c*x))^2/x^3/(e*x^2+d)^2,x)

Fricas [F]

\[ \int \frac {(a+b \arctan (c x))^2}{x^3 \left (d+e x^2\right )^2} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )}^{2}}{{\left (e x^{2} + d\right )}^{2} x^{3}} \,d x } \]

[In]

integrate((a+b*arctan(c*x))^2/x^3/(e*x^2+d)^2,x, algorithm="fricas")

[Out]

integral((b^2*arctan(c*x)^2 + 2*a*b*arctan(c*x) + a^2)/(e^2*x^7 + 2*d*e*x^5 + d^2*x^3), x)

Sympy [F(-1)]

Timed out. \[ \int \frac {(a+b \arctan (c x))^2}{x^3 \left (d+e x^2\right )^2} \, dx=\text {Timed out} \]

[In]

integrate((a+b*atan(c*x))**2/x**3/(e*x**2+d)**2,x)

[Out]

Timed out

Maxima [F]

\[ \int \frac {(a+b \arctan (c x))^2}{x^3 \left (d+e x^2\right )^2} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )}^{2}}{{\left (e x^{2} + d\right )}^{2} x^{3}} \,d x } \]

[In]

integrate((a+b*arctan(c*x))^2/x^3/(e*x^2+d)^2,x, algorithm="maxima")

[Out]

-1/2*a^2*((2*e*x^2 + d)/(d^2*e*x^4 + d^3*x^2) - 2*e*log(e*x^2 + d)/d^3 + 4*e*log(x)/d^3) + integrate((b^2*arct
an(c*x)^2 + 2*a*b*arctan(c*x))/(e^2*x^7 + 2*d*e*x^5 + d^2*x^3), x)

Giac [F]

\[ \int \frac {(a+b \arctan (c x))^2}{x^3 \left (d+e x^2\right )^2} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )}^{2}}{{\left (e x^{2} + d\right )}^{2} x^{3}} \,d x } \]

[In]

integrate((a+b*arctan(c*x))^2/x^3/(e*x^2+d)^2,x, algorithm="giac")

[Out]

sage0*x

Mupad [F(-1)]

Timed out. \[ \int \frac {(a+b \arctan (c x))^2}{x^3 \left (d+e x^2\right )^2} \, dx=\int \frac {{\left (a+b\,\mathrm {atan}\left (c\,x\right )\right )}^2}{x^3\,{\left (e\,x^2+d\right )}^2} \,d x \]

[In]

int((a + b*atan(c*x))^2/(x^3*(d + e*x^2)^2),x)

[Out]

int((a + b*atan(c*x))^2/(x^3*(d + e*x^2)^2), x)